<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"/>
    <title>各种控件的例子</title>

    <link rel="icon" type="image/png" href="/img/icon.png">

    <script type="text/javascript" src="/h5/newall/newall.js"></script>


    <script type="text/javascript" src="/h5/js/all2.js"></script>

    <link rel="stylesheet" type="text/css" href="/h5/newall/newall.css">


</head>
<body>

<div class="mui-content-padded H5body" id="headPicBody">

    <MCform id="jobForm"
            class="mctag formSet">
        <MCtitle class="mctag">头像</MCtitle>
        <div class="content">
            <div class="mui-input-rowtable">
                <label>头像</label>
                <a class="zhuangtai defaultavatar">
                    <img mcname="avatar" :src="avatar" class="headPic"/>
                    <i class="rightico"></i>
                </a>
            </div>
            <div class="mui-input-rowtable">
                <label>用户昵称</label>
                <a class="zhuangtai ">
                    <p mcname="username" SetDataViewInput="User:username" SetDataViewInputType="text" SetDataViewInputMax="13" class="name zhuangtaiP">{{username}}</p>
                    <i class="rightico"></i>
                </a>
            </div>




            <div class="mui-input-rowtable">
                <label>登录手机</label>
                <a class="zhuangtai">
                    <p mcname="phone" class="name zhuangtaiP">{{phone}}</p>
                    <i class="rightico"></i>
                </a>
            </div>


        </div>


    </MCform>


</div>
<style>
    #headPicBody .zhuangtai .headPic {
        width: 0.5rem;
        height: 0.5rem;
        border-radius: 0.5rem;
        display: block;
        position: absolute;
        top: 0.05rem;
        right: 0.05rem;
    }
</style>


<script>
    var view = new MC.View.MCform('#jobForm');
    var pic = new MC.View.PhotoClip();
    $('.defaultavatar').on("click", function () {
        pic.selPic(function (obj) {
            console.log(obj);
            view.vue.avatar = obj;
        });
    });

    MC.user.getInfo(function (data) {
        console.log(data);
        view.vue.avatar = data.avatar;
        view.vue.username = data.username;
        view.vue.phone = data.phone;
    });


</script>
</body>
</html>